package service;

import bo.KeepOrderDetailsBO;
import dto.*;
import org.springframework.web.bind.annotation.*;
import vo.ResponseData;

import java.util.List;
import java.util.Map;

/**
 * @program: sporadic
 * @description:
 * @author: LHD   QQ:1727865856
 * @create: 2019-11-12 11:32
 **/
public interface FrontDeskService {

    @PostMapping("/jwtLogin")
    @ResponseBody
    String jwtlogin(@RequestBody UserInfoDTO userInfoDTO);

    @GetMapping("/queryMenuName")
    @ResponseBody
    ResponseData<List<MenuDTO>> query(@RequestParam("mid") Integer mid);

    @GetMapping("/queryDishes")
    @ResponseBody
    ResponseData<List<DishesDTO>> queryDishes(@RequestParam("mid") Integer mid, @RequestParam("menuid") Integer menuid);

    /**
     *
     * @param mid 门店id
     * @param tableName 餐桌名称
     * @return
     */
    @GetMapping("/queryTableBymidAndtableNum")
    @ResponseBody
    ResponseData<Map<String, Object>> queryTableBymidAndtableNum(@RequestParam("mid") Integer mid, @RequestParam("tableName") String tableName);

    @PostMapping("/addOrder")
    @ResponseBody
    ResponseData<Void> add(@RequestBody OrderDTO orderDTO);

    @PostMapping("/addOrderDetails")
    ResponseData<Void> keepOrderDetails(@RequestBody KeepOrderDetailsBO keepOrderDetailsBO);

    @GetMapping("/queryBymidAllorder")
    @ResponseBody
    ResponseData<List<OrderDTO>> queryBymidAllorder(@RequestParam("mid") Integer mid);

    @GetMapping("/queryAlldeatils")
    @ResponseBody
    public ResponseData<List<OrderDetailsDTO>> queryall(@RequestParam("orderNo") String orderNo);

    @GetMapping("/del")
    @ResponseBody
    public ResponseData<Boolean> del(@RequestParam("detailId") Integer detailId);

    @GetMapping("/selAllUser")
    public ResponseData<List<UserDTO>> selAllUser(@RequestParam(required = false, value = "phone") String phone);

    @GetMapping("/queryorderByid")
    public ResponseData<OrderDTO> queryByid(@RequestParam("orderId") String orderId);

    @GetMapping("/queryByphoneANDmid")
    public ResponseData<List<CouponDTO>> queryByphoneANDmid(@RequestParam("phone") String phone, @RequestParam("mid") Integer mid);

    @PostMapping("/updateOrder")
    public ResponseData<Boolean> updateOrder(@RequestParam("json") String json);

    @GetMapping("/querypay")
    public ResponseData<String> queryPay(@RequestParam("orderNo") String orderNo);
}
